﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class SumUtils
    {
        public int a { get; set; }
        public int s { get; set; }
        public double d { get; set; }
        public double f { get; set; }
        public string g { get; set; }
        public string h { get; set; }

        public void SumAdd(int a, int s)
        {
            int sum;
            sum = a + s;
            Console.WriteLine("和为：" + sum);
        }
        public void SumAdd(double d, double f)
        {
            double sum;
            sum = d + f;
            Console.WriteLine("和为：" + sum);
        }
        public void SumAdd(string g, string h)
        {
            string sum;
            sum = g + h;
            Console.WriteLine("和为：" + sum);
        }
        public void SumAdd(int c)
        {
            int sum = 0;
            for (int i = 0; i < c; i++)
            {
                sum += c;
            }
            Console.WriteLine("从1到指定整数的和为：" + sum);
        }
    }
}
